package com.ljt.response;

public enum  ResultCode implements CustomizeResultCode{
    /**
     * 20000,"成功"
     */
    SUCCESS(20000,"成功"),
    /**
     * 20001,"失败"
     */
    ERROR(20001,"失败"),
    /**
     * 20002,"登录成功"
     */
    LOGIN_SUCCESS(20002,"登录成功"),
    /**
     * 20003,"验证码错误"
     */
    CAPTCHA_VALIDATE_ERROR(20003,"验证码错误"),
    /**
     * 30005,"密码不正确，请重新登录"
     */
    PASS_NOT_CORRECT(30005,"密码不正确，请重新登录"),
    /**
     * 30006,"尚未登录"
     */
    NOT_LOGIN(30006,"尚未登录"),
    /**
     * 30007,"算数异常"
     */
    ARITHMETIC_EXCEPTION(30007,"算数异常"),
    /**
     * 30008,"用户不存在"
     */
    USER_NOT_FOUND(30008,"用户不存在"),
    /**
     * 30009,"未查询到部门信息"
     */
    DEPT_NOT_FOUND(30009,"未查询到部门信息"),
    /**
     * 500,"服务器错误"
     */
    INTERNAL_SERVER_ERROR(500,"服务器冒烟了。。。要么等它降温了再试试？"),
    /**
     * 404,"找不到路径"
     */
    PAGE_NOT_FOUND(404,"你请求的页面暂时飘走了"),
    /**
     * 20005,"没有找到这条记录，有人入侵数据库强制删除了"
     */
    INTRODUCTION_NOT_FOUND(20005,"没有找到这条记录，有人入侵数据库强制删除了"),
    ;

    private Integer code;
    private String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
